﻿<UserControl x:Class="UT3Bots.Visualizer.Controls.UTUIBot"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="20" Height="20" 
	RenderTransformOrigin="0.5,0.5"
	Canvas.Left="{Binding Location.Y, Converter={StaticResource XC}, ConverterParameter=0}" 
	Canvas.Top ="{Binding Location.X, Converter={StaticResource YC}, ConverterParameter=0}"
	>
	
	<UserControl.Resources>
		<Storyboard x:Name="stbChatBubbleIn">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetName="botChatBubble" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" BeginTime="00:00:00">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1">
					<SplineDoubleKeyFrame.KeySpline>
						<KeySpline ControlPoint1="1,0.004" ControlPoint2="1,1"/>
					</SplineDoubleKeyFrame.KeySpline>
				</SplineDoubleKeyFrame>
				<SplineDoubleKeyFrame KeyTime="00:00:05" Value="1"/>
				<SplineDoubleKeyFrame KeyTime="00:00:05.2000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetName="botChatBubble" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" BeginTime="00:00:00">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1">
					<SplineDoubleKeyFrame.KeySpline>
						<KeySpline ControlPoint1="1,0.004" ControlPoint2="1,1"/>
					</SplineDoubleKeyFrame.KeySpline>
				</SplineDoubleKeyFrame>
				<SplineDoubleKeyFrame KeyTime="00:00:05" Value="1"/>
				<SplineDoubleKeyFrame KeyTime="00:00:05.2000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
	
	<Canvas Name="LayoutRoot">
		<Grid Height="20" Width="5" Canvas.Left="14" Canvas.Top="-20" x:Name="botHealthContainer">
			<Rectangle Stroke="#FF000000" />
			<Rectangle Margin="1,1,1,1" x:Name="botHealth" Fill="#FFFF0000" VerticalAlignment="Bottom" Height="18"/>
		</Grid>
		<Canvas>
			<Canvas.RenderTransform>
				<RotateTransform x:Name="transRotate" Angle="0" CenterX="0" CenterY="0"/>
			</Canvas.RenderTransform>
			<Canvas Canvas.Top="-10" Canvas.Left="-10" Width="20" Height="20">
				<Path Name="botFire" Visibility="{Binding IsFiring, Converter={StaticResource VC}}"  Data="M1.5,12 A20,40,0,0,0,21.5,12 L11.5,1.5 z" Height="21.609" Width="23" Canvas.Left="-1.5" Canvas.Top="25.25" Stretch="Fill" StrokeDashCap="Round" StrokeEndLineCap="Flat" StrokeLineJoin="Round" StrokeStartLineCap="Flat" StrokeThickness="1">
					<Path.Fill>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FF000000"/>
							<GradientStop Color="#FFFFFF00" Offset="1"/>
						</LinearGradientBrush>
					</Path.Fill>
				</Path>
				<Ellipse Name="botCircle" Height="20" Width="20" StrokeThickness="1" Stroke="#FF000000" Fill="#FFFFFFFF" HorizontalAlignment="Stretch" />
				<Rectangle Name="botPointer" Canvas.Left="8" Canvas.Top="9" Width="4" Height="20" Fill="Gray" StrokeThickness="1" Stroke="Black" />
				<Canvas Height="20" Width="20" Name="botDamage" Visibility="Collapsed">
					<Path Height="20" Width="20" Canvas.Left="0.125" Canvas.Top="0.125" Stretch="Fill" Stroke="#FFFF0000" StrokeThickness="1" Data="M0.125,0.125 L19.125,19.125"/>
					<Path Height="20" Width="20" Canvas.Left="0.125" Stretch="Fill" Stroke="#FFFF0000" StrokeThickness="1" Data="M19.625,0.375 L0.625,19.375"/>
				</Canvas>
			</Canvas>
		</Canvas>
		<Canvas Canvas.Top="10">
			<TextBlock Name="txtNameShadow" Text="{Binding Name}" Canvas.Top="1" FontFamily="Verdana" TextAlignment="Center" Foreground="Black" FontSize="10" />
			<TextBlock Name="txtName" Text="{Binding Name}" FontFamily="Verdana" TextAlignment="Center" Foreground="Yellow" FontSize="10" />
		</Canvas>
		<Grid Height="70" x:Name="botChatBubble" Width="100" Canvas.Left="-25" Canvas.Top="-78" RenderTransformOrigin="0.140000000596046,0.971000015735626">
			<Grid.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="0" ScaleY="0"/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Grid.RenderTransform>
			<Path Margin="0,0,0,0.25" Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FF000000" StrokeDashCap="Round" StrokeEndLineCap="Round" StrokeLineJoin="Round" StrokeStartLineCap="Round" Data="M0.5,5 C0.5,2.5147185 2.5147185,0.5 5,0.5 L75,0.5 C77.485283,0.5 79.5,2.5147185 79.5,5 L79.5,40 C79.5,42.485283 77.485283,44.5 75,44.5 L11.25,44.5 C10.578195,46.723255 11.151819,48.214314 12.5,49.25 C9.0881519,49.268311 7.1710296,47.590958 6.5,44.5 L5,44.5 C2.5147185,44.5 0.5,42.485283 0.5,40 z"/>
			<TextBlock x:Name="txtChat" Text="Hello" FontFamily="Verdana" TextAlignment="Center" Foreground="#FF000000" FontSize="10" Margin="2.75,3,2.69899988174438,10" VerticalAlignment="Center" TextWrapping="Wrap" />
		</Grid>
	</Canvas>
</UserControl>
